'use strict';

module.exports = app => {
  const mongoose = app.mongoose;
  const UserSchema = new mongoose.Schema({
    username: {
      type: String,
      unique: true
    },
    password: String,
    date: {
      created: {
        type: Date,
        default: Date.now
      },
      login: Date
    }
  });
  return mongoose.model('User', UserSchema);
}
